#ifndef __UNIT_H__
#define __UNIT_H__
#include <ostream>
class UnitType{};
class Unit
{
public:
   Unit(const UnitType* pType, const char* const unitName, double ratio, const Unit* p_nextMaxUnit);
   double toBaseVlaue(double vlaue) const;
   bool isSameType(const Unit& unit) const;
   double getRatioToBase() const;
   virtual bool getMaxUnit(const Unit** p_unit) const =0;
   bool getNextMaxUnit(const Unit** p_unit) const;
   void toString(std::ostream & os,int value) const;
   bool getBaseUnit(const Unit** p_baseUnit) const;
private:
   const UnitType* const pType_m;
   const char* const unitName_m;
   double ratioToBase_m;
   const Unit* p_nextMaxUnit_m;
};


#endif
